const http = require('http')
const server = http.createServer((req,res)=>{
    res.writeHead(200,{
        // 'Access-control-allow-origin':'*',
        'Access-control-allow-origin':'http://127.0.0.1:5502',
    })
    let data = { mag:'Hello,CORS'}
    res.end(JSON.stringify(data))
})

server.listen(3300,()=>{
    console.log('server is running on port 3300')
})